home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 July: Mac OS SDK / Dev.CD Jul 99 SDK1.toast / Development Kits / Mac OS / Interfaces&Libraries / Universal / Interfaces / AIncludes / CardServices.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  35.5 KB  |  1,052 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        CardServices.a
  3. ;
  4. ;    Contains:    The client interface to Card and Socket Services.
  5. ;
  6. ;    Version:    Technology:    System 7.5
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1994-1998 by Apple Computer, Inc. All rights reserved.
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__CARDSERVICES__') = 'UNDEFINED' THEN
  18. __CARDSERVICES__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__PCCARDTUPLES__') = 'UNDEFINED' THEN
  24.     include 'PCCardTuples.a'
  25.     ENDIF
  26.     IF &TYPE('__MIXEDMODE__') = 'UNDEFINED' THEN
  27.     include 'MixedMode.a'
  28.     ENDIF
  29.  
  30. ;     miscellaneous
  31.  
  32.  
  33. CS_MAX_SOCKETS                    EQU        32                    ; a long is used as a socket bitmap
  34.  
  35. ;  Will move to <Traps.h>
  36.  
  37. _PCCardDispatch                    EQU        $AAF0                ; Card Services entry trap
  38. ;  Will move to <Errors.h>
  39.  
  40. ;     result codes
  41.  
  42.  
  43. kCSBadAdapterErr                EQU        -9050                ; invalid adapter number
  44. kCSBadAttributeErr                EQU        -9051                ; specified attributes field value is invalid
  45. kCSBadBaseErr                    EQU        -9052                ; specified base system memory address is invalid
  46. kCSBadEDCErr                    EQU        -9053                ; specified EDC generator specified is invalid
  47. kCSBadIRQErr                    EQU        -9054                ; specified IRQ level is invalid
  48. kCSBadOffsetErr                    EQU        -9055                ; specified PC card memory array offset is invalid
  49. kCSBadPageErr                    EQU        -9056                ; specified page is invalid
  50. kCSBadSizeErr                    EQU        -9057                ; specified size is invalid
  51. kCSBadSocketErr                    EQU        -9058                ; specified logical or physical socket number is invalid
  52. kCSBadTypeErr                    EQU        -9059                ; specified window or interface type is invalid
  53. kCSBadVccErr                    EQU        -9060                ; specified Vcc power level index is invalid
  54. kCSBadVppErr                    EQU        -9061                ; specified Vpp1 or Vpp2 power level index is invalid
  55. kCSBadWindowErr                    EQU        -9062                ; specified window is invalid
  56. kCSBadArgLengthErr                EQU        -9063                ; ArgLength argument is invalid
  57. kCSBadArgsErr                    EQU        -9064                ; values in argument packet are invalid
  58. kCSBadHandleErr                    EQU        -9065                ; clientHandle is invalid
  59. kCSBadCISErr                    EQU        -9066                ; CIS on card is invalid
  60. kCSBadSpeedErr                    EQU        -9067                ; specified speed is unavailable
  61. kCSReadFailureErr                EQU        -9068                ; unable to complete read request
  62. kCSWriteFailureErr                EQU        -9069                ; unable to complete write request
  63. kCSGeneralFailureErr            EQU        -9070                ; an undefined error has occurred
  64. kCSNoCardErr                    EQU        -9071                ; no PC card in the socket
  65. kCSUnsupportedFunctionErr        EQU        -9072                ; function is not supported by this implementation
  66. kCSUnsupportedModeErr            EQU        -9073                ; mode is not supported
  67. kCSBusyErr                        EQU        -9074                ; unable to process request at this time - try later
  68. kCSWriteProtectedErr            EQU        -9075                ; media is write-protected
  69. kCSConfigurationLockedErr        EQU        -9076                ; a configuration has already been locked
  70. kCSInUseErr                        EQU        -9077                ; requested resource is being used by a client
  71. kCSNoMoreItemsErr                EQU        -9078                ; there are no more of the requested item
  72. kCSOutOfResourceErr                EQU        -9079                ; Card Services has exhausted the resource
  73.  
  74.  
  75. ;     messages sent to client's event handler
  76.  
  77.  
  78. kCSNullMessage                    EQU        $00                    ; no messages pending (not sent to clients)
  79. kCSCardInsertionMessage            EQU        $01                    ; card has been inserted into the socket
  80. kCSCardRemovalMessage            EQU        $02                    ; card has been removed from the socket
  81. kCSCardLockMessage                EQU        $03                    ; card is locked into the socket with a mechanical latch
  82. kCSCardUnlockMessage            EQU        $04                    ; card is no longer locked into the socket
  83. kCSCardReadyMessage                EQU        $05                    ; card is ready to be accessed
  84. kCSCardResetMessage                EQU        $06                    ; physical reset has completed
  85. kCSInsertionRequestMessage        EQU        $07                    ; request to insert a card using insertion motor
  86. kCSInsertionCompleteMessage        EQU        $08                    ; insertion motor has finished inserting a card
  87. kCSEjectionRequestMessage        EQU        $09                    ; user or other client is requesting a card ejection
  88. kCSEjectionFailedMessage        EQU        $0A                    ; eject failure due to electrical/mechanical problems
  89. kCSPMResumeMessage                EQU        $0B                    ; power management resume (TBD)
  90. kCSPMSuspendMessage                EQU        $0C                    ; power management suspend (TBD)
  91. kCSResetPhysicalMessage            EQU        $0D                    ; physical reset is about to occur on this card
  92. kCSResetRequestMessage            EQU        $0E                    ; physical reset has been requested by a client
  93. kCSResetCompleteMessage            EQU        $0F                    ; ResetCard() background reset has completed
  94. kCSBatteryDeadMessage            EQU        $10                    ; battery is no longer useable, data will be lost
  95. kCSBatteryLowMessage            EQU        $11                    ; battery is weak and should be replaced
  96. kCSWriteProtectMessage            EQU        $12                    ; card is now write protected
  97. kCSWriteEnabledMessage            EQU        $13                    ; card is now write enabled
  98. kCSClientInfoMessage            EQU        $14                    ; client is to return client information
  99. kCSSSUpdatedMessage                EQU        $15                    ; AddSocketServices/ReplaceSocket services has changed SS support
  100. kCSFunctionInterruptMessage        EQU        $16                    ; card function interrupt
  101. kCSAccessErrorMessage            EQU        $17                    ; client bus errored on access to socket
  102. kCSCardUnconfiguredMessage        EQU        $18                    ; a CARD_READY was delivered to all clients and no client 
  103.                                                             ;    requested a configuration for the socket
  104. kCSStatusChangedMessage            EQU        $19                    ; status change for cards in I/O mode
  105. ;    The following is a mapping of the PCMCIA name space to the Macintosh name space.
  106. ;    These two enum lists will be removed and given to developers as a separate file.
  107. ;
  108.  
  109.  
  110. SUCCESS                            EQU        0
  111. BAD_ADAPTER                        EQU        -9050
  112. BAD_ATTRIBUTE                    EQU        -9051
  113. BAD_BASE                        EQU        -9052
  114. BAD_EDC                            EQU        -9053
  115. BAD_IRQ                            EQU        -9054
  116. BAD_OFFSET                        EQU        -9055
  117. BAD_PAGE                        EQU        -9056
  118. BAD_SIZE                        EQU        -9057
  119. BAD_SOCKET                        EQU        -9058
  120. BAD_TYPE                        EQU        -9059
  121. BAD_VCC                            EQU        -9060
  122. BAD_VPP                            EQU        -9061
  123. BAD_WINDOW                        EQU        -9062
  124. BAD_ARG_LENGTH                    EQU        -9063
  125. BAD_ARGS                        EQU        -9064
  126. BAD_HANDLE                        EQU        -9065
  127. BAD_CIS                            EQU        -9066
  128. BAD_SPEED                        EQU        -9067
  129. READ_FAILURE                    EQU        -9068
  130. WRITE_FAILURE                    EQU        -9069
  131. GENERAL_FAILURE                    EQU        -9070
  132. NO_CARD                            EQU        -9071
  133. UNSUPPORTED_FUNCTION            EQU        -9072
  134. UNSUPPORTED_MODE                EQU        -9073
  135. BUSY                            EQU        -9074
  136. WRITE_PROTECTED                    EQU        -9075
  137. CONFIGURATION_LOCKED            EQU        -9076
  138. IN_USE                            EQU        -9077
  139. NO_MORE_ITEMS                    EQU        -9078
  140. OUT_OF_RESOURCE                    EQU        -9079
  141.  
  142. ;     messages sent to client's event handler
  143.  
  144.  
  145. NULL_MESSAGE                    EQU        $00
  146. CARD_INSERTION                    EQU        $01
  147. CARD_REMOVAL                    EQU        $02
  148. CARD_LOCK                        EQU        $03
  149. CARD_UNLOCK                        EQU        $04
  150. CARD_READY                        EQU        $05
  151. CARD_RESET                        EQU        $06
  152. INSERTION_REQUEST                EQU        $07
  153. INSERTION_COMPLETE                EQU        $08
  154. EJECTION_REQUEST                EQU        $09
  155. EJECTION_FAILED                    EQU        $0A
  156. PM_RESUME                        EQU        $0B
  157. PM_SUSPEND                        EQU        $0C
  158. RESET_PHYSICAL                    EQU        $0D
  159. RESET_REQUEST                    EQU        $0E
  160. RESET_COMPLETE                    EQU        $0F
  161. BATTERY_DEAD                    EQU        $10
  162. BATTERY_LOW                        EQU        $11
  163. WRITE_PROTECT                    EQU        $12
  164. WRITE_ENABLED                    EQU        $13
  165. CLIENT_INFO                        EQU        $14
  166. SS_UPDATED                        EQU        $15
  167. FUNCTION_INTERRUPT                EQU        $16
  168. ACCESS_ERROR                    EQU        $17
  169. CARD_UNCONFIGURED                EQU        $18
  170. STATUS_CHANGED                    EQU        $19
  171.  
  172. ; ----------------        CSAccessConfigurationRegister    ----------------
  173.  
  174. AccessConfigurationRegisterPB RECORD 0
  175. socket                     ds.w    1                ; offset: $0 (0)        ;   -> global socket number
  176. action                     ds.b    1                ; offset: $2 (2)        ;   -> read/write
  177. offset                     ds.b    1                ; offset: $3 (3)        ;   -> offset from config register base
  178. value                     ds.b    1                ; offset: $4 (4)        ;  <-> value to read/write
  179. padding                     ds.b    1                ; offset: $5 (5) <-- really an array of length one ;  
  180. sizeof                     EQU *                    ; size:   $6 (6)
  181.                         ENDR
  182. ;     ‘action’ field values
  183.  
  184.  
  185. kCSReadConfigRegister            EQU        $00
  186. kCSWriteConfigRegister            EQU        $01
  187.  
  188. ; ----------------        CSGetCardServicesInfo            ----------------
  189.  
  190. GetCardServicesInfoPB    RECORD 0
  191. signature                 ds.b    2                ; offset: $0 (0)        ;  <-  two ascii chars 'CS'
  192. count                     ds.w    1                ; offset: $2 (2)        ;  <-  total number of sockets installed
  193. revision                 ds.w    1                ; offset: $4 (4)        ;  <-  BCD
  194. csLevel                     ds.w    1                ; offset: $6 (6)        ;  <-  BCD
  195. reserved                 ds.w    1                ; offset: $8 (8)        ;   -> zero
  196. vStrLen                     ds.w    1                ; offset: $A (10)        ;  <-> in: client's buffer size, out: vendor string length
  197. vendorString             ds.l    1                ; offset: $C (12)        ;  <-> in: pointer to buffer to hold CS vendor string (zero-terminated)
  198. ;       out: CS vendor string copied to buffer
  199. sizeof                     EQU *                    ; size:   $10 (16)
  200.                         ENDR
  201. ; ----------------        CSGetClientInfo                    ----------------
  202.  
  203.  
  204. ;  upper byte of attributes is kCSClientInfoSubfunction
  205. ClientInfoParam            RECORD 0
  206. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  207. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  208. revision                 ds.w    1                ; offset: $6 (6)        ;  <-  BCD value of client's revision
  209. csLevel                     ds.w    1                ; offset: $8 (8)        ;  <-  BCD value of CS release
  210. revDate                     ds.w    1                ; offset: $A (10)        ;  <-  revision date: y[15-9], m[8-5], d[4-0]
  211. nameLen                     ds.w    1                ; offset: $C (12)        ;  <-> in: max length of client name string, out: actual length
  212. vStringLen                 ds.w    1                ; offset: $E (14)        ;  <-> in: max length of vendor string, out: actual length
  213. nameString                 ds.l    1                ; offset: $10 (16)        ;  <-  pointer to client name string (zero-terminated)
  214. vendorString             ds.l    1                ; offset: $14 (20)        ;  <-  pointer to vendor string (zero-terminated)
  215. sizeof                     EQU *                    ; size:   $18 (24)
  216.                         ENDR
  217.  
  218. ;   upper byte of attributes is kCSCardNameSubfunction,
  219. ;                                 kCSCardTypeSubfunction,
  220. ;                                 kCSHelpStringSubfunction
  221.  
  222.  
  223. AlternateTextStringParam RECORD 0
  224. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  225. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  226. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  227. reserved                 ds.w    1                ; offset: $8 (8)        ;   -> zero
  228. length                     ds.w    1                ; offset: $A (10)        ;  <-> in: max length of string, out: actual length
  229. text                     ds.l    1                ; offset: $C (12)        ;  <-  pointer to string (zero-terminated)
  230. sizeof                     EQU *                    ; size:   $10 (16)
  231.                         ENDR
  232. ;  upper byte of attributes is kCSCardIconSubfunction
  233. AlternateCardIconParam    RECORD 0
  234. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  235. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  236. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  237. iconSuite                 ds.l    1                ; offset: $8 (8)        ;  <-  handle to icon suite containing all icons
  238. sizeof                     EQU *                    ; size:   $C (12)
  239.                         ENDR
  240. ;  upper byte of attributes is kCSActionProcSubfunction
  241. CustomActionProcParam    RECORD 0
  242. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  243. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> subfunction + bitmapped client attributes
  244. socket                     ds.w    1                ; offset: $6 (6)        ;   -> logical socket number
  245. sizeof                     EQU *                    ; size:   $8 (8)
  246.                         ENDR
  247. GetClientInfoPB            RECORD 0
  248. clientInfo                 ds        ClientInfoParam ; offset: $0 (0)
  249.                          ORG 0
  250. alternateTextString         ds        AlternateTextStringParam ; offset: $0 (0)
  251.                          ORG 0
  252. alternateIcon             ds        AlternateCardIconParam ; offset: $0 (0)
  253.                          ORG 0
  254. customActionProc         ds        CustomActionProcParam ; offset: $0 (0)
  255.                          ORG 24
  256. sizeof                     EQU *                    ; size:   $18 (24)
  257.                         ENDR
  258. ;     ‘attributes’ field values
  259.  
  260. kCSMemoryClient                    EQU        $0001
  261. kCSIOClient                        EQU        $0004
  262. kCSClientTypeMask                EQU        $0007
  263. kCSShareableCardInsertEvents    EQU        $0008
  264. kCSExclusiveCardInsertEvents    EQU        $0010
  265. kCSInfoSubfunctionMask            EQU        $FF00
  266. kCSClientInfoSubfunction        EQU        $0000
  267. kCSCardNameSubfunction            EQU        $8000
  268. kCSCardTypeSubfunction            EQU        $8100
  269. kCSHelpStringSubfunction        EQU        $8200
  270. kCSCardIconSubfunction            EQU        $8300
  271. kCSActionProcSubfunction        EQU        $8400
  272.  
  273.  
  274. ;  ----------------        CSGetConfigurationInfo            ----------------
  275. ;  ----------------        CSModifyConfiguration            ----------------
  276. ;  ----------------        CSRequestConfiguration            ----------------
  277.  
  278.  
  279.  
  280. GetModRequestConfigInfoPB RECORD 0
  281. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  282. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket number
  283. attributes                 ds.w    1                ; offset: $6 (6)        ;  <-> bitmap of configuration attributes
  284. vcc                         ds.b    1                ; offset: $8 (8)        ;  <-> Vcc setting
  285. vpp1                     ds.b    1                ; offset: $9 (9)        ;  <-> Vpp1 setting
  286. vpp2                     ds.b    1                ; offset: $A (10)        ;  <-> Vpp2 setting
  287. intType                     ds.b    1                ; offset: $B (11)        ;  <-> interface type (memory or memory+I/O)
  288. configBase                 ds.l    1                ; offset: $C (12)        ;  <-> card base address of configuration registers
  289. status                     ds.b    1                ; offset: $10 (16)        ;  <-> card status register setting, if present
  290. pin                         ds.b    1                ; offset: $11 (17)        ;  <-> card pin register setting, if present
  291. copy                     ds.b    1                ; offset: $12 (18)        ;  <-> card socket/copy register setting, if present
  292. configIndex                 ds.b    1                ; offset: $13 (19)        ;  <-> card option register setting, if present
  293. present                     ds.b    1                ; offset: $14 (20)        ;  <-> bitmap of which configuration registers are present
  294. firstDevType             ds.b    1                ; offset: $15 (21)        ;  <-  from DeviceID tuple
  295. funcCode                 ds.b    1                ; offset: $16 (22)        ;  <-  from FuncID tuple
  296. sysInitMask                 ds.b    1                ; offset: $17 (23)        ;  <-  from FuncID tuple
  297. manufCode                 ds.w    1                ; offset: $18 (24)        ;  <-  from ManufacturerID tuple
  298. manufInfo                 ds.w    1                ; offset: $1A (26)        ;  <-  from ManufacturerID tuple
  299. cardValues                 ds.b    1                ; offset: $1C (28)        ;  <-  valid card register values
  300. padding                     ds.b    1                ; offset: $1D (29) <-- really an array of length one ;  
  301. sizeof                     EQU *                    ; size:   $1E (30)
  302.                         ENDR
  303. ;     ‘attributes’ field values
  304.  
  305. kCSExclusivelyUsed                EQU        $0001
  306. kCSEnableIREQs                    EQU        $0002
  307. kCSVccChangeValid                EQU        $0004
  308. kCSVpp1ChangeValid                EQU        $0008
  309. kCSVpp2ChangeValid                EQU        $0010
  310. kCSValidClient                    EQU        $0020
  311. kCSSleepPower                    EQU        $0040                ; request that power be applied to socket during Sleep
  312. kCSLockSocket                    EQU        $0080
  313. kCSTurnOnInUse                    EQU        $0100
  314. ;     ‘intType’ field values
  315.  
  316.  
  317. kCSMemoryInterface                EQU        $01
  318. kCSMemory_And_IO_Interface        EQU        $02
  319. ;     ‘present’ field values
  320.  
  321.  
  322. kCSOptionRegisterPresent        EQU        $01
  323. kCSStatusRegisterPresent        EQU        $02
  324. kCSPinReplacementRegisterPresent EQU    $04
  325. kCSCopyRegisterPresent            EQU        $08
  326. ;     ‘cardValues’ field values
  327.  
  328.  
  329. kCSOptionValueValid                EQU        $01
  330. kCSStatusValueValid                EQU        $02
  331. kCSPinReplacementValueValid        EQU        $04
  332. kCSCopyValueValid                EQU        $08
  333.  
  334.  
  335. ;  ----------------        CSGetClientEventMask            ----------------
  336. ;  ----------------        CSSetClientEventMask            ----------------
  337.  
  338.  
  339.  
  340. GetSetClientEventMaskPB    RECORD 0
  341. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  342. attributes                 ds.w    1                ; offset: $4 (4)        ;  <-> bitmap of attributes
  343. eventMask                 ds.w    1                ; offset: $6 (6)        ;  <-> bitmap of events to be passed to client for this socket
  344. socket                     ds.w    1                ; offset: $8 (8)        ;   -> logical socket number
  345. sizeof                     EQU *                    ; size:   $A (10)
  346.                         ENDR
  347. ;     ‘attributes’ field values
  348.  
  349. kCSEventMaskThisSocketOnly        EQU        $0001
  350. ;     ‘eventMask’ field values
  351.  
  352.  
  353. kCSWriteProtectEvent            EQU        $0001
  354. kCSCardLockChangeEvent            EQU        $0002
  355. kCSEjectRequestEvent            EQU        $0004
  356. kCSInsertRequestEvent            EQU        $0008
  357. kCSBatteryDeadEvent                EQU        $0010
  358. kCSBatteryLowEvent                EQU        $0020
  359. kCSReadyChangeEvent                EQU        $0040
  360. kCSCardDetectChangeEvent        EQU        $0080
  361. kCSPMChangeEvent                EQU        $0100
  362. kCSResetEvent                    EQU        $0200
  363. kCSSSUpdateEvent                EQU        $0400
  364. kCSFunctionInterrupt            EQU        $0800
  365. kCSAllEvents                    EQU        $FFFF
  366.  
  367.  
  368. ;  ----------------        CSGetFirstClient                ----------------
  369. ;  ----------------        CSGetNextClient                    ----------------
  370.  
  371.  
  372.  
  373. GetClientPB                RECORD 0
  374. clientHandle             ds.l    1                ; offset: $0 (0)        ;  <-  clientHandle for this client
  375. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket number
  376. attributes                 ds.w    1                ; offset: $6 (6)        ;   -> bitmap of attributes
  377. sizeof                     EQU *                    ; size:   $8 (8)
  378.                         ENDR
  379. ;     ‘attributes’ field values
  380.  
  381. kCSClientsForAllSockets            EQU        $0000
  382. kCSClientsThisSocketOnly        EQU        $0001
  383.  
  384.  
  385. ;  ----------------        CSGetFirstTuple                    ----------------
  386. ;  ----------------        CSGetNextTuple                    ----------------
  387. ;  ----------------        CSGetTupleData                    ----------------
  388.  
  389.  
  390.  
  391. GetTuplePB                RECORD 0
  392. socket                     ds.w    1                ; offset: $0 (0)        ;   -> logical socket number
  393. attributes                 ds.w    1                ; offset: $2 (2)        ;   -> bitmap of attributes
  394. desiredTuple             ds.b    1                ; offset: $4 (4)        ;   -> desired tuple code value, or $FF for all
  395. tupleOffset                 ds.b    1                ; offset: $5 (5)        ;   -> offset into tuple from link byte
  396. flags                     ds.w    1                ; offset: $6 (6)        ;  <-> internal use
  397. linkOffset                 ds.l    1                ; offset: $8 (8)        ;  <-> internal use
  398. cisOffset                 ds.l    1                ; offset: $C (12)        ;  <-> internal use
  399. tupleCode                 ds.b    1                ; offset: $10 (16)        ;  <-  tuple code found
  400. tupleLink                 ds.b    1                ; offset: $11 (17)        ;  <-  link value for tuple found
  401.                          ORG 16
  402. tupleDataMax             ds.w    1                ; offset: $10 (16)        ;   -> maximum size of tuple data area
  403. tupleDataLen             ds.w    1                ; offset: $12 (18)        ;  <-  number of bytes in tuple body
  404. tupleData                 ds        TupleBody        ; offset: $14 (20)        ;  <-  tuple data
  405. sizeof                     EQU *                    ; size:   $112 (274)
  406.                         ENDR
  407. ;     ‘attributes’ field values
  408.  
  409. kCSReturnLinkTuples                EQU        $0001
  410.  
  411.  
  412. ;  ----------------        CSRequestSocketMask                ----------------
  413. ;  ----------------        CSReleaseSocketMask                ----------------
  414.  
  415.  
  416.  
  417. ReqRelSocketMaskPB        RECORD 0
  418. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  419. socket                     ds.w    1                ; offset: $4 (4)        ;   -> logical socket
  420. eventMask                 ds.w    1                ; offset: $6 (6)        ;   -> bitmap of events to be passed to client for this socket
  421. sizeof                     EQU *                    ; size:   $8 (8)
  422.                         ENDR
  423. ;     ‘eventMask’ field values (see above for Get/SetClientEventMask
  424.  
  425. ; ----------------        CSGetStatus                        ----------------
  426.  
  427. GetStatusPB                RECORD 0
  428. socket                     ds.w    1                ; offset: $0 (0)        ;   -> logical socket number
  429. cardState                 ds.w    1                ; offset: $2 (2)        ;  <-  current state of installed card
  430. socketState                 ds.w    1                ; offset: $4 (4)        ;  <-  current state of the socket
  431. sizeof                     EQU *                    ; size:   $6 (6)
  432.                         ENDR
  433. ;     ‘cardState’ field values
  434.  
  435. kCSWriteProtected                EQU        $0001
  436. kCSCardLocked                    EQU        $0002
  437. kCSEjectRequest                    EQU        $0004
  438. kCSInsertRequest                EQU        $0008
  439. kCSBatteryDead                    EQU        $0010
  440. kCSBatteryLow                    EQU        $0020
  441. kCSReady                        EQU        $0040
  442. kCSCardDetected                    EQU        $0080
  443. ;     ‘socketState’ field values
  444.  
  445.  
  446. kCSWriteProtectChanged            EQU        $0001
  447. kCSCardLockChanged                EQU        $0002
  448. kCSEjectRequestPending            EQU        $0004
  449. kCSInsertRequestPending            EQU        $0008
  450. kCSBatteryDeadChanged            EQU        $0010
  451. kCSBatteryLowChanged            EQU        $0020
  452. kCSReadyChanged                    EQU        $0040
  453. kCSCardDetectChanged            EQU        $0080
  454.  
  455.  
  456. ;  ----------------        CSModifyWindow                    ----------------
  457. ;  ----------------        CSReleaseWindow                    ----------------
  458. ;  ----------------        CSRequestWindow                    ----------------
  459.  
  460.  
  461.  
  462. ReqModRelWindowPB        RECORD 0
  463. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  464. windowHandle             ds.l    1                ; offset: $4 (4)        ;  <-> window descriptor
  465. socket                     ds.w    1                ; offset: $8 (8)        ;   -> logical socket number
  466. attributes                 ds.w    1                ; offset: $A (10)        ;   -> window attributes (bitmap)
  467. base                     ds.l    1                ; offset: $C (12)        ;  <-> system base address
  468. size                     ds.l    1                ; offset: $10 (16)        ;  <-> memory window size
  469. accessSpeed                 ds.b    1                ; offset: $14 (20)        ;   -> window access speed (bitmap)
  470. ;         (not applicable for I/O mode)
  471. padding                     ds.b    1                ; offset: $15 (21) <-- really an array of length one ;  
  472. sizeof                     EQU *                    ; size:   $16 (22)
  473.                         ENDR
  474. ;     ‘attributes’ field values
  475.  
  476. kCSMemoryWindow                    EQU        $0001
  477. kCSIOWindow                        EQU        $0002
  478. kCSAttributeWindow                EQU        $0004                ; not normally used by Card Services clients
  479. kCSWindowTypeMask                EQU        $0007
  480. kCSEnableWindow                    EQU        $0008
  481. kCSAccessSpeedValid                EQU        $0010
  482. kCSLittleEndian                    EQU        $0020                ; configure socket for little endianess
  483. kCS16BitDataPath                EQU        $0040
  484. kCSWindowPaged                    EQU        $0080                ; 
  485. kCSWindowShared                    EQU        $0100
  486. kCSWindowFirstShared            EQU        $0200                ; 
  487. kCSWindowProgrammable            EQU        $0400                ; 
  488. ;     ‘accessSpeed’ field values
  489.  
  490.  
  491. kCSDeviceSpeedCodeMask            EQU        $07
  492. kCSSpeedExponentMask            EQU        $07
  493. kCSSpeedMantissaMask            EQU        $78
  494. kCSUseWait                        EQU        $80
  495. kCSAccessSpeed250nsec            EQU        $01
  496. kCSAccessSpeed200nsec            EQU        $02
  497. kCSAccessSpeed150nsec            EQU        $03
  498. kCSAccessSpeed100nsec            EQU        $04
  499. kCSExtAccSpeedMant1pt0            EQU        $01
  500. kCSExtAccSpeedMant1pt2            EQU        $02
  501. kCSExtAccSpeedMant1pt3            EQU        $03
  502. kCSExtAccSpeedMant1pt5            EQU        $04
  503. kCSExtAccSpeedMant2pt0            EQU        $05
  504. kCSExtAccSpeedMant2pt5            EQU        $06
  505. kCSExtAccSpeedMant3pt0            EQU        $07
  506. kCSExtAccSpeedMant3pt5            EQU        $08
  507. kCSExtAccSpeedMant4pt0            EQU        $09
  508. kCSExtAccSpeedMant4pt5            EQU        $0A
  509. kCSExtAccSpeedMant5pt0            EQU        $0B
  510. kCSExtAccSpeedMant5pt5            EQU        $0C
  511. kCSExtAccSpeedMant6pt0            EQU        $0D
  512. kCSExtAccSpeedMant7pt0            EQU        $0E
  513. kCSExtAccSpeedMant8pt0            EQU        $0F
  514. kCSExtAccSpeedExp1ns            EQU        $00
  515. kCSExtAccSpeedExp10ns            EQU        $01
  516. kCSExtAccSpeedExp100ns            EQU        $02
  517. kCSExtAccSpeedExp1us            EQU        $03
  518. kCSExtAccSpeedExp10us            EQU        $04
  519. kCSExtAccSpeedExp100us            EQU        $05
  520. kCSExtAccSpeedExp1ms            EQU        $06
  521. kCSExtAccSpeedExp10ms            EQU        $07
  522.  
  523.  
  524. ;  ----------------        CSRegisterClient                ----------------
  525. ;  ----------------        CSDeregisterClient                ----------------
  526.  
  527.  
  528.  
  529. ClientCallbackPB        RECORD 0
  530. message                     ds.w    1                ; offset: $0 (0)        ;   -> which event this is
  531. socket                     ds.w    1                ; offset: $2 (2)        ;   -> logical socket number
  532. info                     ds.w    1                ; offset: $4 (4)        ;   -> function-specific
  533. misc                     ds.w    1                ; offset: $6 (6)        ;   -> function-specific
  534. reserved                 ds.l    1                ; offset: $8 (8)        ;   -> pointer to MTD request block
  535. buffer                     ds.l    1                ; offset: $C (12)        ;   -> function-specific
  536. clientData                 ds.l    1                ; offset: $10 (16)        ;   -> pointer to client's data (from RegisterClient)
  537. sizeof                     EQU *                    ; size:   $14 (20)
  538.                         ENDR
  539. ; typedef struct ClientCallbackPB *        ClientCallbackPBPtr
  540.  
  541. RegisterClientPB        RECORD 0
  542. clientHandle             ds.l    1                ; offset: $0 (0)        ;  <-  client descriptor
  543. clientEntry                 ds.l    1                ; offset: $4 (4)        ;   -> universal procPtr to client's event handler
  544. attributes                 ds.w    1                ; offset: $8 (8)        ;   -> bitmap of client attributes
  545. eventMask                 ds.w    1                ; offset: $A (10)        ;   -> bitmap of events to notify client
  546. clientData                 ds.l    1                ; offset: $C (12)        ;   -> pointer to client's data
  547. version                     ds.w    1                ; offset: $10 (16)        ;   -> Card Services version this client expects
  548. sizeof                     EQU *                    ; size:   $12 (18)
  549.                         ENDR
  550. ;     ‘attributes’ field values (see GetClientInfo)
  551.  
  552. ;      kCSMemoryClient                    = 0x0001,
  553. ;      kCSIOClient                        = 0x0004,
  554. ;      kCSShareableCardInsertEvents    = 0x0008,
  555. ;      kCSExclusiveCardInsertEvents    = 0x0010
  556.  
  557.  
  558.  
  559.  
  560. ; ----------------        CSReleaseConfiguration            ----------------
  561.  
  562. ReleaseConfigurationPB    RECORD 0
  563. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  564. socket                     ds.w    1                ; offset: $4 (4)        ;   -> 
  565. sizeof                     EQU *                    ; size:   $6 (6)
  566.                         ENDR
  567. ; ----------------        CSResetCard                        ----------------
  568.  
  569. ResetCardPB                RECORD 0
  570. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  571. socket                     ds.w    1                ; offset: $4 (4)        ;   -> 
  572. attributes                 ds.w    1                ; offset: $6 (6)        ;   -> xxx
  573. sizeof                     EQU *                    ; size:   $8 (8)
  574.                         ENDR
  575. ; ----------------        CSValidateCIS                    ----------------
  576.  
  577. ValidateCISPB            RECORD 0
  578. socket                     ds.w    1                ; offset: $0 (0)        ;   -> 
  579. chains                     ds.w    1                ; offset: $2 (2)        ;   -> whether link/null tuples should be included
  580. sizeof                     EQU *                    ; size:   $4 (4)
  581.                         ENDR
  582.  
  583. ;  ----------------        CSRequestIO                        ----------------
  584. ;  ----------------        CSReleaseIO                        ----------------
  585.  
  586.  
  587.  
  588. ReqRelIOPB                RECORD 0
  589. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  590. socket                     ds.w    1                ; offset: $4 (4)        ;   -> socket number
  591. reserved                 ds.w    1                ; offset: $6 (6)
  592. basePort1                 ds.w    1                ; offset: $8 (8)        ;     ->    base I/O port for range
  593. numPorts1                 ds.b    1                ; offset: $A (10)        ;     ->    number of ports (e.g., bytes).
  594. attributes1                 ds.b    1                ; offset: $B (11)        ;     ->    attributes
  595. basePort2                 ds.w    1                ; offset: $C (12)        ;     ->    base I/O port for range
  596. numPorts2                 ds.b    1                ; offset: $E (14)        ;     ->    number of ports
  597. attributes2                 ds.b    1                ; offset: $F (15)        ;     ->    attributes
  598. ioAddrLines                 ds.b    1                ; offset: $10 (16)        ;     -> number of I/O lines decoded by card
  599. reserved1                 ds.b    1                ; offset: $11 (17)
  600. sizeof                     EQU *                    ; size:   $12 (18)
  601.                         ENDR
  602. ; ----------------        CSVendorSpecific                ----------------
  603. VendorSpecificPB        RECORD 0
  604. clientHandle             ds.l    1                ; offset: $0 (0)        ;   -> clientHandle returned by RegisterClient
  605. vsCode                     ds.w    1                ; offset: $4 (4)
  606. socket                     ds.w    1                ; offset: $6 (6)
  607. dataLen                     ds.l    1                ; offset: $8 (8)        ;   -> length of buffer pointed to by vsDataPtr
  608. vsDataPtr                 ds.l    1                ; offset: $C (12)        ;   -> Card Services version this client expects
  609. sizeof                     EQU *                    ; size:   $10 (16)
  610.                         ENDR
  611. ;     ‘vsCode’ field values
  612.  
  613.  
  614. vsAppleReserved                    EQU        $0000
  615. vsEjectCard                        EQU        $0001
  616. vsGetCardInfo                    EQU        $0002
  617. vsEnableSocketEvents            EQU        $0003
  618. vsGetCardLocationIcon            EQU        $0004
  619. vsGetCardLocationText            EQU        $0005
  620. vsGetAdapterInfo                EQU        $0006
  621.  
  622. ;  ///////////////////////////////////////////////////////////////////////////////////////
  623. ;      GetAdapterInfo parameter block (vendor-specific call #6)
  624.  
  625.  
  626.  
  627. GetAdapterInfoPB        RECORD 0
  628. attributes                 ds.l    1                ; offset: $0 (0)        ;  <-  capabilties of socket's adapter
  629. revision                 ds.w    1                ; offset: $4 (4)        ;  <-  id of adapter
  630. reserved                 ds.w    1                ; offset: $6 (6)        ;  
  631. numVoltEntries             ds.w    1                ; offset: $8 (8)        ;  <-  number of valid voltage values
  632. voltages                 ds.l    1                ; offset: $A (10)        ;  <-> array of BCD voltage values
  633. sizeof                     EQU *                    ; size:   $E (14)
  634.                         ENDR
  635. ;     ‘attributes’ field values
  636.  
  637. kCSLevelModeInterrupts            EQU        $00000001
  638. kCSPulseModeInterrupts            EQU        $00000002
  639. kCSProgrammableWindowAddr        EQU        $00000004
  640. kCSProgrammableWindowSize        EQU        $00000008
  641. kCSSocketSleepPower                EQU        $00000010
  642. kCSSoftwareEject                EQU        $00000020
  643. kCSLockableSocket                EQU        $00000040
  644. kCSInUseIndicator                EQU        $00000080
  645.  
  646. ;  ///////////////////////////////////////////////////////////////////////////////////////
  647. ;      GetCardInfo parameter block (vendor-specific call #2)
  648.  
  649.  
  650.  
  651. GetCardInfoPB            RECORD 0
  652. cardType                 ds.b    1                ; offset: $0 (0)        ;  <-  type of card in this socket (defined at top of file)
  653. subType                     ds.b    1                ; offset: $1 (1)        ;  <-  more detailed card type (defined at top of file)
  654. reserved                 ds.w    1                ; offset: $2 (2)        ;  <-> reserved (should be set to zero)
  655. cardNameLen                 ds.w    1                ; offset: $4 (4)        ;   -> maximum length of card name to be returned
  656. vendorNameLen             ds.w    1                ; offset: $6 (6)        ;   -> maximum length of vendor name to be returned
  657. cardName                 ds.l    1                ; offset: $8 (8)        ;   -> pointer to card name string (read from CIS), or nil
  658. vendorName                 ds.l    1                ; offset: $C (12)        ;   -> pointer to vendor name string (read from CIS), or nil
  659. sizeof                     EQU *                    ; size:   $10 (16)
  660.                         ENDR
  661. ;     GetCardInfo card types
  662.  
  663. kCSUnknownCardType                EQU        0
  664. kCSMultiFunctionCardType        EQU        1
  665. kCSMemoryCardType                EQU        2
  666. kCSSerialPortCardType            EQU        3
  667. kCSSerialOnlyType                EQU        0
  668. kCSDataModemType                EQU        1
  669. kCSFaxModemType                    EQU        2
  670. kCSFaxAndDataModemMask            EQU        3
  671. kCSVoiceEncodingType            EQU        4
  672. kCSParallelPortCardType            EQU        4
  673. kCSFixedDiskCardType            EQU        5
  674. kCSUnknownFixedDiskType            EQU        0
  675. kCSATAInterface                    EQU        1
  676. kCSRotatingDevice                EQU        $00
  677. kCSSiliconDevice                EQU        $80
  678. kCSVideoAdaptorCardType            EQU        6
  679. kCSNetworkAdaptorCardType        EQU        7
  680. kCSAIMSCardType                    EQU        8
  681. kCSNumCardTypes                    EQU        9
  682.  
  683.     IF &TYPE('__PCCARDENABLERPLUGIN__') = 'UNDEFINED' THEN
  684. ;    NOTE: These prototypes conflict with PCCardEnablerPlugin.≈
  685. ;          You cannot use both PCCardEnablerPlugin.h and CardServices.h
  686. ;          
  687. ;
  688.  
  689. ;
  690. ; pascal OSErr CSVendorSpecific(VendorSpecificPB *pb)
  691. ;
  692.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  693.         Macro
  694.         _CSVendorSpecific
  695.             moveq               #0,D0
  696.             dc.w                $AAF0
  697.         EndM
  698.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  699.         IMPORT_CFM_FUNCTION CSVendorSpecific
  700.     ENDIF
  701.  
  702. ;
  703. ; pascal OSErr CSRegisterClient(RegisterClientPB *pb)
  704. ;
  705.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  706.         Macro
  707.         _CSRegisterClient
  708.             moveq               #1,D0
  709.             dc.w                $AAF0
  710.         EndM
  711.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  712.         IMPORT_CFM_FUNCTION CSRegisterClient
  713.     ENDIF
  714.  
  715. ;
  716. ; pascal OSErr CSDeregisterClient(RegisterClientPB *pb)
  717. ;
  718.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  719.         Macro
  720.         _CSDeregisterClient
  721.             moveq               #2,D0
  722.             dc.w                $AAF0
  723.         EndM
  724.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  725.         IMPORT_CFM_FUNCTION CSDeregisterClient
  726.     ENDIF
  727.  
  728. ;
  729. ; pascal OSErr CSGetFirstTuple(GetTuplePB *pb)
  730. ;
  731.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  732.         Macro
  733.         _CSGetFirstTuple
  734.             moveq               #3,D0
  735.             dc.w                $AAF0
  736.         EndM
  737.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  738.         IMPORT_CFM_FUNCTION CSGetFirstTuple
  739.     ENDIF
  740.  
  741. ;
  742. ; pascal OSErr CSGetNextTuple(GetTuplePB *pb)
  743. ;
  744.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  745.         Macro
  746.         _CSGetNextTuple
  747.             moveq               #4,D0
  748.             dc.w                $AAF0
  749.         EndM
  750.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  751.         IMPORT_CFM_FUNCTION CSGetNextTuple
  752.     ENDIF
  753.  
  754. ;
  755. ; pascal OSErr CSGetTupleData(GetTuplePB *pb)
  756. ;
  757.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  758.         Macro
  759.         _CSGetTupleData
  760.             moveq               #5,D0
  761.             dc.w                $AAF0
  762.         EndM
  763.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  764.         IMPORT_CFM_FUNCTION CSGetTupleData
  765.     ENDIF
  766.  
  767. ;
  768. ; pascal OSErr CSGetConfigurationInfo(GetModRequestConfigInfoPB *pb)
  769. ;
  770.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  771.         Macro
  772.         _CSGetConfigurationInfo
  773.             moveq               #6,D0
  774.             dc.w                $AAF0
  775.         EndM
  776.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  777.         IMPORT_CFM_FUNCTION CSGetConfigurationInfo
  778.     ENDIF
  779.  
  780. ;
  781. ; pascal OSErr CSGetCardServicesInfo(GetCardServicesInfoPB *pb)
  782. ;
  783.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  784.         Macro
  785.         _CSGetCardServicesInfo
  786.             moveq               #7,D0
  787.             dc.w                $AAF0
  788.         EndM
  789.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  790.         IMPORT_CFM_FUNCTION CSGetCardServicesInfo
  791.     ENDIF
  792.  
  793. ;
  794. ; pascal OSErr CSGetStatus(GetStatusPB *pb)
  795. ;
  796.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  797.         Macro
  798.         _CSGetStatus
  799.             moveq               #8,D0
  800.             dc.w                $AAF0
  801.         EndM
  802.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  803.         IMPORT_CFM_FUNCTION CSGetStatus
  804.     ENDIF
  805.  
  806. ;
  807. ; pascal OSErr CSValidateCIS(ValidateCISPB *pb)
  808. ;
  809.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  810.         Macro
  811.         _CSValidateCIS
  812.             moveq               #9,D0
  813.             dc.w                $AAF0
  814.         EndM
  815.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  816.         IMPORT_CFM_FUNCTION CSValidateCIS
  817.     ENDIF
  818.  
  819. ;
  820. ; pascal OSErr CSGetFirstClient(GetClientPB *pb)
  821. ;
  822.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  823.         Macro
  824.         _CSGetFirstClient
  825.             moveq               #15,D0
  826.             dc.w                $AAF0
  827.         EndM
  828.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  829.         IMPORT_CFM_FUNCTION CSGetFirstClient
  830.     ENDIF
  831.  
  832. ;
  833. ; pascal OSErr CSGetNextClient(GetClientPB *pb)
  834. ;
  835.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  836.         Macro
  837.         _CSGetNextClient
  838.             moveq               #16,D0
  839.             dc.w                $AAF0
  840.         EndM
  841.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  842.         IMPORT_CFM_FUNCTION CSGetNextClient
  843.     ENDIF
  844.  
  845. ;
  846. ; pascal OSErr CSGetClientInfo(GetClientInfoPB *pb)
  847. ;
  848.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  849.         Macro
  850.         _CSGetClientInfo
  851.             moveq               #17,D0
  852.             dc.w                $AAF0
  853.         EndM
  854.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  855.         IMPORT_CFM_FUNCTION CSGetClientInfo
  856.     ENDIF
  857.  
  858. ;
  859. ; pascal OSErr CSResetCard(ResetCardPB *pb)
  860. ;
  861.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  862.         Macro
  863.         _CSResetCard
  864.             moveq               #18,D0
  865.             dc.w                $AAF0
  866.         EndM
  867.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  868.         IMPORT_CFM_FUNCTION CSResetCard
  869.     ENDIF
  870.  
  871. ;
  872. ; pascal OSErr CSRequestWindow(ReqModRelWindowPB *pb)
  873. ;
  874.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  875.         Macro
  876.         _CSRequestWindow
  877.             moveq               #19,D0
  878.             dc.w                $AAF0
  879.         EndM
  880.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  881.         IMPORT_CFM_FUNCTION CSRequestWindow
  882.     ENDIF
  883.  
  884. ;
  885. ; pascal OSErr CSModifyWindow(ReqModRelWindowPB *pb)
  886. ;
  887.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  888.         Macro
  889.         _CSModifyWindow
  890.             moveq               #20,D0
  891.             dc.w                $AAF0
  892.         EndM
  893.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  894.         IMPORT_CFM_FUNCTION CSModifyWindow
  895.     ENDIF
  896.  
  897. ;
  898. ; pascal OSErr CSReleaseWindow(ReqModRelWindowPB *pb)
  899. ;
  900.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  901.         Macro
  902.         _CSReleaseWindow
  903.             moveq               #21,D0
  904.             dc.w                $AAF0
  905.         EndM
  906.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  907.         IMPORT_CFM_FUNCTION CSReleaseWindow
  908.     ENDIF
  909.  
  910. ;
  911. ; pascal OSErr CSRequestConfiguration(GetModRequestConfigInfoPB *pb)
  912. ;
  913.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  914.         Macro
  915.         _CSRequestConfiguration
  916.             moveq               #27,D0
  917.             dc.w                $AAF0
  918.         EndM
  919.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  920.         IMPORT_CFM_FUNCTION CSRequestConfiguration
  921.     ENDIF
  922.  
  923. ;
  924. ; pascal OSErr CSModifyConfiguration(GetModRequestConfigInfoPB *pb)
  925. ;
  926.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  927.         Macro
  928.         _CSModifyConfiguration
  929.             moveq               #28,D0
  930.             dc.w                $AAF0
  931.         EndM
  932.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  933.         IMPORT_CFM_FUNCTION CSModifyConfiguration
  934.     ENDIF
  935.  
  936. ;
  937. ; pascal OSErr CSAccessConfigurationRegister(AccessConfigurationRegisterPB *pb)
  938. ;
  939.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  940.         Macro
  941.         _CSAccessConfigurationRegister
  942.             moveq               #29,D0
  943.             dc.w                $AAF0
  944.         EndM
  945.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  946.         IMPORT_CFM_FUNCTION CSAccessConfigurationRegister
  947.     ENDIF
  948.  
  949. ;
  950. ; pascal OSErr CSReleaseConfiguration(ReleaseConfigurationPB *pb)
  951. ;
  952.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  953.         Macro
  954.         _CSReleaseConfiguration
  955.             moveq               #30,D0
  956.             dc.w                $AAF0
  957.         EndM
  958.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  959.         IMPORT_CFM_FUNCTION CSReleaseConfiguration
  960.     ENDIF
  961.  
  962. ;
  963. ; pascal OSErr CSGetClientEventMask(GetSetClientEventMaskPB *pb)
  964. ;
  965.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  966.         Macro
  967.         _CSGetClientEventMask
  968.             moveq               #31,D0
  969.             dc.w                $AAF0
  970.         EndM
  971.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  972.         IMPORT_CFM_FUNCTION CSGetClientEventMask
  973.     ENDIF
  974.  
  975. ;
  976. ; pascal OSErr CSSetClientEventMask(GetSetClientEventMaskPB *pb)
  977. ;
  978.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  979.         Macro
  980.         _CSSetClientEventMask
  981.             moveq               #32,D0
  982.             dc.w                $AAF0
  983.         EndM
  984.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  985.         IMPORT_CFM_FUNCTION CSSetClientEventMask
  986.     ENDIF
  987.  
  988. ;
  989. ; pascal OSErr CSRequestSocketMask(ReqRelSocketMaskPB *pb)
  990. ;
  991.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  992.         Macro
  993.         _CSRequestSocketMask
  994.             moveq               #33,D0
  995.             dc.w                $AAF0
  996.         EndM
  997.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  998.         IMPORT_CFM_FUNCTION CSRequestSocketMask
  999.     ENDIF
  1000.  
  1001. ;
  1002. ; pascal OSErr CSReleaseSocketMask(ReqRelSocketMaskPB *pb)
  1003. ;
  1004.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1005.         Macro
  1006.         _CSReleaseSocketMask
  1007.             moveq               #34,D0
  1008.             dc.w                $AAF0
  1009.         EndM
  1010.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1011.         IMPORT_CFM_FUNCTION CSReleaseSocketMask
  1012.     ENDIF
  1013.  
  1014.  
  1015.  
  1016. ;      Additional calls which are required for all I/O clients when running on
  1017. ;      systems which do not reserve dedicated I/O-spaces for each PC Card.
  1018.  
  1019.  
  1020.  
  1021. ;
  1022. ; pascal OSErr CSRequestIO(ReqRelIOPB *pb)
  1023. ;
  1024.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1025.         Macro
  1026.         _CSRequestIO
  1027.             moveq               #37,D0
  1028.             dc.w                $AAF0
  1029.         EndM
  1030.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1031.         IMPORT_CFM_FUNCTION CSRequestIO
  1032.     ENDIF
  1033.  
  1034. ;
  1035. ; pascal OSErr CSReleaseIO(ReqRelIOPB *pb)
  1036. ;
  1037.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  1038.         Macro
  1039.         _CSReleaseIO
  1040.             moveq               #38,D0
  1041.             dc.w                $AAF0
  1042.         EndM
  1043.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  1044.         IMPORT_CFM_FUNCTION CSReleaseIO
  1045.     ENDIF
  1046.  
  1047.     ENDIF
  1048.     ENDIF ; __CARDSERVICES__ 
  1049.  
  1050.